// mixin混入
import mixin from '@/shop/mixins';
// 挂载工具函数
import tools from '@/shop/utils/tools'
//挂载全局http请求
import http from '@/config/requestConfig'
import api from '@/config/baseRequest'
// #ifdef H5
// uni方法重写, h5的粘贴板的设置，获取。图片视频的保存
import wxsdk from '@/shop/wechat/sdk'
import '@/shop/utils/sdk-h5.js'
// #endif
import wechat from '@/shop/wechat/wechat';

import base from '@/config/baseUrl';
// 平台判断代码
import platform from '@/shop/platform';

const install = Vue => {
	// 挂载请求
	Vue.prototype.$api = api;
	Vue.prototype.$http = http;
	Vue.prototype.$API_URL = base.baseUrl;
	Vue.prototype.$IMG_URL = base.imgUrl;
	// 平台判断
	Vue.prototype.$platform = platform;
	// 挂载工具函数
	Vue.prototype.$tools = tools;
	
	// 混入
	Vue.mixin(mixin);
	// #ifdef H5
	// 微信H5,sdk挂载
	Vue.prototype.$wxsdk = wxsdk;
	// #endif
}

export default {
	install
}